#include "stdafx.h"
#include <boost/test/auto_unit_test.hpp>
#include "bmock.hpp"
#include "bmock_control_tools_mock.hpp"

static void f() {
	MOCK_VOID(0,());
}
static void g() {
	MOCK_VOID(0,());
}

struct scoped_expect_tester_base2 {
protected:
	scoped_expect_tester_base2(bool doExpect) {
		BMOCK_CREATE_MOCK(*);
		BMOCK_EXPECT(f());
		if(doExpect) BMOCK_EXPECT(g());
		BMOCK_REPLAY;
	}
	~scoped_expect_tester_base2() {
		BMOCK_VERIFY;
	}
};

struct scoped_expect_tester_true2 : public scoped_expect_tester_base2 {
	scoped_expect_tester_true2()
		:scoped_expect_tester_base2(true)
	{}
};

BMOCK_TEST(scoped_expect_tester_true2,test_OK) {
	f();
	g();
}

struct scoped_expect_tester_false2 : public scoped_expect_tester_base2 {
	scoped_expect_tester_false2()
		:scoped_expect_tester_base2(false)
	{}
};

BMOCK_TEST(scoped_expect_tester_false2,test_OK) {
	f();
}
